<div class="users view">
<h2><?php  __('User');?></h2>
	<dl><?php $i = 0; $class = ' class="altrow"';?>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $user['User']['id']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Username'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $user['User']['username']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Password'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $user['User']['password']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Active'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $user['User']['active']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Note'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $user['User']['note']; ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<h3><?php __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Edit User', true), array('action' => 'edit', $user['User']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('Delete User', true), array('action' => 'delete', $user['User']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $user['User']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('List Users', true), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New User', true), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Gopyhts', true), array('controller' => 'gopyhts', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Gopyht', true), array('controller' => 'gopyhts', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Thongbaos', true), array('controller' => 'thongbaos', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Thongbao', true), array('controller' => 'thongbaos', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List User Roles', true), array('controller' => 'user_roles', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New User Role', true), array('controller' => 'user_roles', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php __('Related Gopyhts');?></h3>
	<?php if (!empty($user['Gopyht'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Id'); ?></th>
		<th><?php __('User Id'); ?></th>
		<th><?php __('Chude'); ?></th>
		<th><?php __('Noidung'); ?></th>
		<th><?php __('Ngayghi'); ?></th>
		<th><?php __('Ghichu'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($user['Gopyht'] as $gopyht):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $gopyht['id'];?></td>
			<td><?php echo $gopyht['user_id'];?></td>
			<td><?php echo $gopyht['chude'];?></td>
			<td><?php echo $gopyht['noidung'];?></td>
			<td><?php echo $gopyht['ngayghi'];?></td>
			<td><?php echo $gopyht['ghichu'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View', true), array('controller' => 'gopyhts', 'action' => 'view', $gopyht['id'])); ?>
				<?php echo $this->Html->link(__('Edit', true), array('controller' => 'gopyhts', 'action' => 'edit', $gopyht['id'])); ?>
				<?php echo $this->Html->link(__('Delete', true), array('controller' => 'gopyhts', 'action' => 'delete', $gopyht['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $gopyht['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Gopyht', true), array('controller' => 'gopyhts', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php __('Related Thongbaos');?></h3>
	<?php if (!empty($user['Thongbao'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Id'); ?></th>
		<th><?php __('User Id'); ?></th>
		<th><?php __('Tieude'); ?></th>
		<th><?php __('Noidung'); ?></th>
		<th><?php __('Ngaytao'); ?></th>
		<th><?php __('Active'); ?></th>
		<th><?php __('Note'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($user['Thongbao'] as $thongbao):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $thongbao['id'];?></td>
			<td><?php echo $thongbao['user_id'];?></td>
			<td><?php echo $thongbao['tieude'];?></td>
			<td><?php echo $thongbao['noidung'];?></td>
			<td><?php echo $thongbao['ngaytao'];?></td>
			<td><?php echo $thongbao['active'];?></td>
			<td><?php echo $thongbao['note'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View', true), array('controller' => 'thongbaos', 'action' => 'view', $thongbao['id'])); ?>
				<?php echo $this->Html->link(__('Edit', true), array('controller' => 'thongbaos', 'action' => 'edit', $thongbao['id'])); ?>
				<?php echo $this->Html->link(__('Delete', true), array('controller' => 'thongbaos', 'action' => 'delete', $thongbao['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $thongbao['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Thongbao', true), array('controller' => 'thongbaos', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php __('Related User Roles');?></h3>
	<?php if (!empty($user['UserRole'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('User Id'); ?></th>
		<th><?php __('Role Id'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($user['UserRole'] as $userRole):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $userRole['user_id'];?></td>
			<td><?php echo $userRole['role_id'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View', true), array('controller' => 'user_roles', 'action' => 'view', $userRole['role_id'])); ?>
				<?php echo $this->Html->link(__('Edit', true), array('controller' => 'user_roles', 'action' => 'edit', $userRole['role_id'])); ?>
				<?php echo $this->Html->link(__('Delete', true), array('controller' => 'user_roles', 'action' => 'delete', $userRole['role_id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $userRole['role_id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New User Role', true), array('controller' => 'user_roles', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
